import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import 'vant/lib/index.css'
// import "amfe-flexible"
// 导入normalize.css
import 'normalize.css'
import '@/styles/comm.css'
// import '@/api/mock.js'

import componentJs from '@/components/index.js'

// 注册全局组件
Vue.use(componentJs)

// 全局过滤器注册
import filtersObj from '@/filters/index.js'
// Vue.filter('filterTimeGlobal', filtersObj.filterTimeGlobal)
// for (const key in filtersObj) {
//   Vue.filter(key, filtersObj[key])
// }
// Object.keys()   将对象的key转换成数组   Object.values:将对象的value转换成数组  Object.entries:将对象的key与value转换成数组
// 全局过滤器注册
Object.keys(filtersObj).forEach(item => {
  Vue.filter(item, filtersObj[item])
})

Vue.use(Vant)
Vue.config.productionTip = false

new Vue({ 
  router,
  store,
  render: h => h(App)
}).$mount('#app')
